package com.gome.ss.flowcrawl.extractor;

import java.util.Date;

public class FlowCrawlExtractorStatus {
	
	public static int STATUS_NONE = 0;
	public static int STATUS_START = 1;
	public static int STATUS_END = 2;
	
	private String name = "";
	private String stepID = "";
	private int dateSize = 0;
	private int progress = 0;
	private boolean isIncremental = false;
	private Date startTime = new Date();
	private Date stopTime = new Date();
	
	
	private int status = STATUS_NONE;
	
	public FlowCrawlExtractorStatus() {
		
	}
	
	public FlowCrawlExtractorStatus(FlowCrawlExtractorConfig config) {
		this.name = config.getName();
		this.stepID = config.getStepID();
	}
	
	public void setConfig(FlowCrawlExtractorConfig config) {
		this.name = config.getName();
		this.stepID = config.getStepID();
	}
	
	public int getStatus() {
		return status;
	}
	
	public void start() {
		startTime = new Date();
		status = STATUS_START;
	}
	
	public void stop() {
		stopTime = new Date();
		status = STATUS_END;
	}
	
	public int getProgress() {
		return progress;
	}
	
	public void setProgress(int progress) {
		this.progress = progress;
	}

	public int getDateSize() {
		return dateSize;
	}

	public void setDateSize(int dateSize) {
		this.dateSize = dateSize;
	}

	public boolean isIncremental() {
		return isIncremental;
	}

	public void setIncremental(boolean isIncremental) {
		this.isIncremental = isIncremental;
	}

}
